
<template>
  <div>
    <h1 v-bgred v-bgblue>wenshuihong</h1>
  </div>
</template>

<script>
export default {
  name: "Count",
  // 自定义指令
  directives:{
    bgred(ele){
      ele.style.backgroundColor="red"
    }
  }
};
</script>

<style>
</style>